<template>
  <div>
    <div class="c-flex c-mg-b-5p" v-show="showToolbar">
      <div class="c-flex-item-auto">
        <slot name="toolbar"></slot>
        <slot name="toolbar-left"></slot>
      </div>
      <div>
        <slot name="toolbar-right"></slot>
        <el-button :type="isExpandQuery ? undefined : 'primary'" v-show="showQuery"
          @click="isExpandQuery = !isExpandQuery">
          查询器
          <el-icon>
            <el-icon-arrowUp v-show="isExpandQuery" />
            <el-icon-arrowDown v-show="!isExpandQuery" />
          </el-icon>
          <!-- <i class="el-icon--right" :class="{
            'el-icon-arrow-up': isExpandQuery,
            'el-icon-arrow-down': !isExpandQuery,
          }"></i> -->
        </el-button>
      </div>
    </div>
    <div v-show="showQuery" class="c-mg-b-5p">
      <el-form class="__query-box c-query-form" inline :label-width="queryLabelWidth" v-show="isExpandQuery"
        @keyup.prevent.enter.native="query()">
        <div style="display: flex; justify-content: center">
          <div>
            <slot name="query"></slot>
          </div>
        </div>
        <div style="text-align: center; margin-top: 10px">
          <el-button type="text" icon="el-icon-search" @click="query()" :disabled="disabled" :loading="isLoading">{{
            queryButtonText
            }}
          </el-button>
          <el-button type="text" @click="resetQuery" :disabled="disabled" :loading="isLoading">重置</el-button>
        </div>
      </el-form>
    </div>
  </div>
</template>
<script setup>
</script>